﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Lawyer.Web.Admin
{
    public partial class admin_customdetail : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    string CustomID = strid;
                    ShowInfo(CustomID);
                }
            }
        }

        private void ShowInfo(string CustomID)
        {
            Lawyer.BLL.CustomInfo bll = new Lawyer.BLL.CustomInfo();
            Lawyer.Model.CustomInfo model = bll.GetModel(CustomID);
            //this.lblCustomID.Text = model.CustomID;
            this.lblFullName.Text = model.FullName;
            this.lblEmail.Text = model.Email;
            if (model.Sex == null)
            { this.lblSex.Text = ""; }
            else if (String.Compare(model.Sex, "1") == 0)
            {
                this.lblSex.Text = "male";
            }
            else
            {
                this.lblSex.Text = "female";
            }
            this.lblBirthday.Text = model.Birthday.ToString();
            this.lblCity.Text = model.City;
            this.lblTelphone.Text = model.Telphone;
            this.lblFax.Text = model.Fax;
            this.lblAddress.Text = model.Address;
            this.lblAvatarURL.Text = model.AvatarURL;
        }
    }
}
